package com.eazyshop.goods.dao;


import com.eazyshop.goods.pojo.Spec;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SpecMapper extends Mapper<Spec> {

        @Select("SELECT  ts.* FROM tb_category tc INNER JOIN tb_template tt ON tc.`template_id`=tt.id INNER JOIN tb_spec ts ON ts.template_id=tt.id WHERE tc.`name`=#{categoryName}")
        List<Spec> findSpecByCategoryName(@Param("categoryName") String categoryName );

}
